package com.demo.action;

import com.demo.common.CreateUUID;
import com.demo.model.Users;
import com.demo.service.UsersService;
import com.demo.service.impl.UsersServiceImpl;

public class myAction {
	//利用单例模式调取service中的对象
	private static UsersService service =UsersServiceImpl.getUsersServiceImpl();
	
	//创建action的单例模式
	private static myAction action=new myAction();
	private myAction() {};
	public static myAction getmyAction() {
		return action;
	}
	
	
	public boolean save(Users user) {
		user.setId(CreateUUID.getUUID());

		return service.tab_users_save(user); 
		
	}
	

}
